package com.open.server.one.controller;

import com.open.commons.aspect.Log;
import com.open.server.one.service.OderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：liushuai
 * @date ：Created in 2021/9/30 10:02
 * @description：${description}
 * @modified By：
 * @version: $version$
 */
@Slf4j
@RequestMapping
@RestController
@Log
public class OrderController {
    @Autowired
    private OderService oderService;

    @PostMapping("/searchOrder")
    public String searchOrder(@RequestBody String name) {
        log.info("service1 开始执行");
        String resultOfService2 = oderService.getOrderByName(name);
        log.info("service1 执行完毕" + resultOfService2);
        return "service1";
    }
}
